package com.my.log.config.prop;

/**
 * @author timo 2021/3/1
 */
public enum BladeLogLevel {
    NONE(0),
    BASIC(1),
    HEADERS(2),
    BODY(3);

    public static final String REQ_LOG_PROPS_PREFIX = "blade.log.request";
    public static final String CONSOLE_LOG_ENABLED_PROP = "blade.log.console.enabled";
    private final int level;

    public boolean lte(BladeLogLevel level) {
        return this.level <= level.level;
    }

    public int getLevel() {
        return this.level;
    }

    private BladeLogLevel(final int level) {
        this.level = level;
    }
}
